In a dynamically typed storage system, a shared data store (e.g. database) provides common backing for a varied collection of applications. A unit of storage is an “item” formed by a collection of smaller units called “entities” with one Entity acting as a core or central Entity. Each Entity is associated with a physical type and a whole Item expresses a logical type based on the superposition of all contributing physical types but strongly biased by the type of its core Entity. Applications are implemented in terms of either the physical and/or logical types and perform a set of operations on the instances of those types including but not limited to reading, updating, and complex instance-specific operations (e.g., Verbs, Methods, etc.).
Types, both physical and logical, form a hierarchical structure such that one type is said to derive from another. An instance of a subtype may be treated as and operated on as if it were any of its ancestral types. Subtypes may extend, but not alter, the data definition, logic, or constraints of its ancestral types. In addition, supplementary Entity instances may be “composed” with existing Items and are said to extend or augment the data of that instance. The logical type of that instance, so extended, can similarly be treated as or operated on as if it were the logical type without such extensions.
The data in the storage system is shared and operated on by all applications such that no application owns a specific piece of data or controls the ability of other applications to use or extend that data subject to security and policy. Physical types may be introduced to the system at any time that extend existing types and the definer of a type is a distinct agent from the applications that use that type (though in practice applications will likely act to introduce types they intend to use if they are not already available). Because types may be introduced at any time, no application can be expected to implement the appropriate logic for all types whose instances it may encounter.
Thus, it is desirable to obtain a dynamically typed storage system such that the system can allow type designers to express the logic and constraints necessary to ensure the consistency of a type's instances both at the Entity and Item level. It should also allow the most interactive use of instances while disallowing operations that would violate the consistency of its type. Applications should also be allowed to be written without implementing or executing the logic of types unknown at the time of development. It is also desirable to allow the type system to continue to be extended with new types, both physical and logical, without adversely impacting existing applications' ability to execute in a predictable manner.